package com.qingfeng.client.bean;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/5/6 4:12 下午
 */
@ApiModel(value = "com.qingfeng.client.bean.PostageTemplate")
@Data
@TableName(value = "postage_template")
public class PostageTemplate {
    /**
     * 邮费id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "邮费id")
    private Integer id;

    /**
     * 首重单位克
     */
    @Min(value = 0,message = "重量必须大于0")
    @TableField(value = "first_weight")
    @ApiModelProperty(value = "首重单位克")
    private Integer firstWeight;

    /**
     * 首重运费单位分
     */
    @Min(value = 0,message = "首重运费必须大于0")
    @TableField(value = "first_price")
    @ApiModelProperty(value = "首重运费单位分")
    private Integer firstPrice;

    /**
     * 续重单位克
     */
    @TableField(value = "second_weight")
    @ApiModelProperty(value = "续重单位克")
    private Integer secondWeight;

    /**
     * 续重运费单位分
     */
    @TableField(value = "second_price")
    @ApiModelProperty(value = "续重运费单位分")
    private Integer secondPrice;

    /**
     * 满多少包邮
     */
    @TableField(value = "free_price",insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "满多少包邮")
    private Integer freePrice;

    /**
     * 是否是默认地址
     */
    @TableField(value = "def")
    @ApiModelProperty(value = "是否是默认地址")
    private Boolean def;

    /**
     * 店铺id
     */
    @TableField(value = "store_id")
    @ApiModelProperty(value = "店铺id")
    private Integer storeId;

}
